export const dataTypeData = [
	{
		label: '字符串',
		options:[
			{ label: 'char - 255 Bytes', 						value: 'char' },
			{ label: 'char_len - 255 Bytes', 					value: 'char_len', range: [0,255] },
			{ label: 'varchar - 65535 Bytes', 					value: 'varchar(255)' },
			{ label: 'varchar_len - 65535 Bytes', 				value: 'varchar_len', range:[0, 65535] },
			{ label: 'text - 65535 bytes', 						value: 'text' },
			{ label: 'tinytext - 255 bytes', 					value: 'tinytext' },
			{ label: 'longtext -4 294 967 295 bytes', 			value: 'longtext' },
		]
	},
	{
		label: '整数',
		options: [
			{ label: 'int - 4 Byte（-2 147 483 648 ~ 2 147 483 647）', 	value: 'int' },
			{ label: 'integer - int', 									value: 'integer' },
			{ label: 'tinyint - 1 Bytes（-128 ~ 127）', 				value: 'tinyint' },
			{ label: 'smallint -  2 Bytes（-32 768 ~ 32 767）', 		value: 'smallint' },
			{ label: 'mediumint - 3 Bytes（-8 388 608 ~ 8 388 607）', 	value: 'mediumint' },
			{ label: `bigint - 8 Bytes（-9 223 372 036 854 775 808 ~ 9 223 372 036 854 775 807）`, 	value: 'bigint'},
		]
	},
	{
		label: '正整数',
		options: [
			{ label: 'int unsigned', 		value: 'int unsigned' },
			{ label: 'integer unsigned', 	value: 'integer unsigned' },
			{ label: 'tinyint unsigned', 	value: 'tinyint unsigned' },
			{ label: 'smallint unsigned', 	value: 'smallint unsigned' },
			{ label: 'mediumint unsigned', 	value: 'mediumint unsigned' },
			{ label: 'bigint unsigned', 	value: 'bigint unsigned' },
		]
	},
	{
		label: '小数',
		options: [
			{ label: 'decimal - (65, 2)', 								value: 'decimal' },
			{ label: 'decimal_len - (65, 2)', 							value: 'decimal_len', range: [0,65] },
			{ label: 'numeric - (65, 5)', 								value: 'numeric' },
			{ label: 'numeric_len - (65, 5)', 							value: 'numeric_len', range: [0,65] },
			{ label: 'float - 4 Bytes', 								value: 'float' },
			{ label: `double - 8 Bytes`, 								value: 'double' },
			{ label: `real - double`, 									value: 'real' },
		]
	},
	{
		label: '布尔值',
		options: [
			{ label: 'boolean', 								value: 'boolean' },
			{ label: 'bool', 									value: 'bool' }
		]
	},
	{
		label:'时间',
		options:[
			{ label: 'date - YYYY-MM-DD', 						value: 'date' },
			{ label: 'date_time - YYYY-MM-DD HH:MM:SS', 		value: 'date_time' },
			{ label: 'timestamp - YYYYMMDD HHMMSS', 			value: 'timestamp' },
			{ label: 'time - HH:MM:SS', 						value: 'time' },
			{ label: 'year - YYYY', 							value: 'year' },
		]
	},
	{
		label: '二进制',
		options: [
			{ label: 'blob - 65535 bytes - 65KB', 				value: 'blob' },
			{ label: 'tinyblob - 255 bytes', 					value: 'tinyblob' },
			{ label: 'mediumblob - 16 777 215 bytes - 16M', 	value: 'mediumblob' },
			{ label: 'longblob - 4 294 967 295 bytes - 4GB', 	value: 'longblob' },
			{ label: 'binary - 65535 bytes', 					value: 'binary' },
			{ label: 'varbinary - 65535 bytes', 				value: 'varbinary' },
			{ label: 'varbinary_len - 65535 bytes', 			value: 'varbinary_len', range: [0,65535] },
		]
	},
	{
		label: '其它',
		options: [
			{ label: 'json', 									value: 'json' },
			{ label: 'enum', 									value: 'enum' },
			{ label: 'set', 									value: 'set' },
		]
	}
]
export const keyData = [
	{ label:'主键索引（Primary Key）',  value: 'PRI' },
	{ label:'唯一索引（Unique Index）', value: 'UNI' },
	{ label:'普通索引（Index）', value: 'INDEX' },
	{ label:'全文索引（Fulltext）', value: 'FULL' }
]
export const indexData = {
	'PRI': '主键索引',
	'UNI': '唯一索引',
	'INDEX': '普通索引',
	'MUL': '普通索引',
	'FULL': '全文索引',
}
export const siteData = [
	{ label:'开头添加',  value: 'first' },
	{ label:'中间添加', value: 'after' },
	// { label:'最后添加', value: 'last' }
]
export const foreignData = [
	{
		label: '删除时的级联操作类型',
		options: [
			{ label: '级联删除 - cascade', 						value: 'on delete cascade' },
			{ label: '外键有记录不删除 - on action', 				value: 'on delete on action' },
			{ label: '外键有记录不删除 - restrict', 				value: 'on delete restrict' },
			{ label: '设置外键值为空 - set null', 				value: 'on delete set null' },
			{ label: '设置外键值为默认值 - set default', 			value: 'on delete set default' },
		]
	},
	{
		label: '更新时的级联操作类型',
		options: [
			{ label: '级联更新 - cascade', 						value: 'on update cascade' },
			{ label: '外键有记录不更新 - on action', 				value: 'on update on action' },
			{ label: '外键有记录不更新 - restrict', 				value: 'on update restrict' },
			{ label: '设置外键值为空 - set null', 				value: 'on update set null' },
			{ label: '设置外键值为默认值 - set default', 			value: 'on update set default' },
		]
	}
]
export const nameData = [
	{
		label: '常用字段',
		options: [
			{ label:'ID-i32',  	value: 'id', 		sql:{ Type:'int', 									Null:0, auto_increment:1, Key:'PRI', 		Default:'', 					Extra:'' }},
			{ label:'ID-u32',  	value: 'id', 		sql:{ Type:'int unsigned', 							Null:0, auto_increment:1, Key:'PRI', 		Default:'', 					Extra:'' }},
			{ label:'Uuid',  	value: 'uuid', 			sql:{ Type:'char_len', 			x:32, 			Null:0, auto_increment:0, Key:'', 		Default:'', 						Extra:"default(replace(uuid(), '-', ''))"}},
			{ label:'价格',  	value: 'price', 		sql:{ Type:'decimal_len', 		x:9, 	y:2, 	Null:0, auto_increment:0, Key:'', 			Default:0, 						Extra:'' }},
			{ label:'启用',  	value: 'enabled', 		sql:{ Type:'tinyint unsigned', 					Null:0, auto_increment:0, Key:'', 			Default:0, 						Extra:'' }},
			{ label:'状态',  	value: 'status', 		sql:{ Type:'tinyint', 							Null:0, auto_increment:0, Key:'', 			Default:0, 						Extra:'' }},
			{ label:'备注',  	value: 'mark', 			sql:{ Type:'varchar_len', 		x:30, 			Null:1, auto_increment:0, Key:'', 			Default:'', 					Extra:'' }},
			{ label:'创建人-i32',value: 'create_user', 	sql:{ Type:'int', 								Null:0, auto_increment:0, Key:'', 			Default:'', 					Extra:'' }},
			{ label:'创建人-u32',value: 'create_user', 	sql:{ Type:'int unsigned', 						Null:0, auto_increment:0, Key:'', 			Default:'', 					Extra:'' }},
			{ label:'修改人-i32',value: 'update_user', 	sql:{ Type:'int', 								Null:1, auto_increment:0, Key:'', 			Default:'', 					Extra:'' }},
			{ label:'修改人-u32',value: 'update_user', 	sql:{ Type:'int unsigned', 						Null:1, auto_increment:0, Key:'', 			Default:'', 					Extra:'' }},
			{ label:'创建时间',  value: 'create_time', 	sql:{ Type:'timestamp', 						Null:1, auto_increment:0, Key:'', 			Default:'current_timestamp',	Extra: '' }},
			{ label:'修改时间',  value: 'update_time', 	sql:{ Type:'timestamp', 						Null:1, auto_increment:0, Key:'',  			Default:'current_timestamp', 	Extra: 'on update current_timestamp' }},
		]
	},
	{
		label: '文件',
		options: [
			{ label:'文件地址',  	value: 'image', 	sql:{ Type:'varchar_len', 	x:27, 				Null:1, auto_increment:0, Key:'UNI', 		Default:'', 					Extra:''}},
			{ label:'Gridfs 地址', 	value: 'gridfs', 	sql:{ Type:'varchar_len', 	x:32, 				Null:1, auto_increment:0, Key:'UNI', 		Default:'', 					Extra:''}},
		]
	},
	{
		label: 'migrations',
		options: [
			{ label:'置顶', 			value: 'top', 			sql:{ Type:'bool', 								Null:1, auto_increment:0, Key:'', 			Default:0, 						Extra:''}},
			{ label:'是否清空', 			value: 'clear', 		sql:{ Type:'bool', 								Null:1, auto_increment:0, Key:'', 			Default:0, 						Extra:''}},
		]
	}
]
export const defaultData = [
	{ label:'当前时间戳',  value: 'timestamp' }
]